import request from '@/utils/request'

export function getBudgetData(yearAndQuarter) {
  return request({
    url: '/budget/getBudgetData',
    method: 'post',
    params: { yearAndQuarter: yearAndQuarter }
  })
}

export function insertBudgetByYear(year) {
  return request({
    url: '/budget/insertBudgetByYear',
    method: 'get',
    params: { year: year }
  })
}

export function updateBudget(params) {
  return request({
    url: '/budget/updateBudget',
    method: 'post',
    data: params
  })
}

export function getOne(id) {
  return request({
    url: '/budget/getOne',
    method: 'get',
    params: { id: id }
  })
}

export function getBudgetOneYear(pageNum, pageSize, year) {
  return request({
    url: '/budget/getBudgetOneYear',
    method: 'get',
    params: {
      pageNum: pageNum,
      pageSize: pageSize,
      year: year }
  })
}
